package com.szrt.java.day20161229.demo05;

public class Car {
	
	private int price;
	
	private String brand;
	
	
	
	
	

	public Car() {
		System.out.println("调用Car的无参构造方法... 无");
	}
	

	public Car(int price, String brand) {
		System.out.println("调用Car的有参构造方法... 有");
		this.price = price;
		this.brand = brand;
	}





	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}


	@Override
	public String toString() {
		return "Car [price=" + price + ", brand=" + brand + "]";
	}
	
	
	
	
	

}
